package com.kitchen.ui.deco
{
	import flash.geom.Rectangle;

	public class FloorContainer extends DecoContainer
	{
		public function FloorContainer(w:int, h:int)
		{
			super(w, h);
			this.pid = 4;
			this.prange = new Rectangle(0, 0, w,h);
			this.bg = new BackGround(w, h);
			this.bg.x = this.bg.y = 0;
			this.addChild(this.bg);
		}
		
		/**
		 * 添加饰品
		 **/
		override public function append(deco:Object):void{
			if(deco.nPosit == this.pid){
				var tdeco:DecoItem = new DecoItem(deco, this.prange);
				this.decos.push(tdeco);
				this.addChild(tdeco);
			}else if(deco.nPosit == 3){
				this.bg.setBgImage(deco);
			}
		}
		
	}
}